package com.grass.p019lv.adapter;

import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.alibaba.android.arouter.launcher.ARouter;
import com.androidsa.bttsddka.R;
import com.androidx.p013lv.base.Constance;
import com.androidx.p013lv.base.bean.InventionThreeBean;
import com.androidx.p013lv.base.bean.VideoBean;
import com.androidx.p013lv.base.glide.GlideUtils;
import com.androidx.p013lv.base.interfaces.Key;
import com.androidx.p013lv.base.listener.ItemClickListener;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

/* renamed from: com.grass.lv.adapter.HotActressAdapter */
public class HotActressAdapter extends BaseQuickAdapter<InventionThreeBean, BaseViewHolder> {
    private boolean clickLimit = true;
    private long lastClickTime;
    String mDomain;

    public void setDomain(String str) {
        this.mDomain = str;
    }

    public HotActressAdapter() {
        super(R.layout.item_popular_actress, null);
    }

    /* access modifiers changed from: protected */
    public void convert(BaseViewHolder baseViewHolder, final InventionThreeBean inventionThreeBean) {
        LinearLayout linearLayout = (LinearLayout) baseViewHolder.getView(R.id.ll_item);
        RecyclerView recyclerView = (RecyclerView) baseViewHolder.getView(R.id.recycler);
        if (!inventionThreeBean.isEmpty()) {
            linearLayout.setVisibility(0);
            ImageView imageView = (ImageView) baseViewHolder.getView(R.id.iv_avatar);
            final AdapterActress adapterActress = new AdapterActress(this.mDomain);
            recyclerView.setLayoutManager(new LinearLayoutManager(getContext(), 0, false));
            recyclerView.setAdapter(adapterActress);
            adapterActress.setItemListener(new ItemClickListener() {
                /* class com.grass.p019lv.adapter.HotActressAdapter.C29691 */

                @Override // com.androidx.p013lv.base.listener.ItemClickListener
                public void onItemClick(View view, int i) {
                    if (!HotActressAdapter.this.isOnClick()) {
                        ARouter.getInstance().build(Constance.VIDEO_PLAY_ACTIVITY).withInt(Key.VIDEO_ID, ((VideoBean) adapterActress.getDataInPosition(i)).getVideoId()).navigation();
                    }
                }
            });
            GlideUtils.loadPicHeadWh(this.mDomain + inventionThreeBean.getHeadImg(), imageView, 150);
            adapterActress.setData(inventionThreeBean.getVideoList());
            ((TextView) baseViewHolder.getView(R.id.tv_include)).setText(inventionThreeBean.getVideoNum() + "部影片");
            ((TextView) baseViewHolder.getView(R.id.tv_name)).setText(inventionThreeBean.getContentName());
            ((TextView) baseViewHolder.getView(R.id.tv_more)).setOnClickListener(new View.OnClickListener() {
                /* class com.grass.p019lv.adapter.HotActressAdapter.View$OnClickListenerC29702 */

                public void onClick(View view) {
                    if (!HotActressAdapter.this.isOnClick()) {
                        ARouter.getInstance().build(Constance.STAR_INFO_ACTIVITY).withInt("type", inventionThreeBean.getContentId()).withString(Key.TXT, "返回").navigation();
                    }
                }
            });
            ((RelativeLayout) baseViewHolder.getView(R.id.rl_title_desc)).setOnClickListener(new View.OnClickListener() {
                /* class com.grass.p019lv.adapter.HotActressAdapter.View$OnClickListenerC29713 */

                public void onClick(View view) {
                    if (!HotActressAdapter.this.isOnClick()) {
                        ARouter.getInstance().build(Constance.STAR_INFO_ACTIVITY).withInt("type", inventionThreeBean.getContentId()).withString(Key.TXT, "返回").navigation();
                    }
                }
            });
            imageView.setOnClickListener(new View.OnClickListener() {
                /* class com.grass.p019lv.adapter.HotActressAdapter.View$OnClickListenerC29724 */

                public void onClick(View view) {
                    if (!HotActressAdapter.this.isOnClick()) {
                        ARouter.getInstance().build(Constance.STAR_INFO_ACTIVITY).withInt("type", inventionThreeBean.getContentId()).withString(Key.TXT, "返回").navigation();
                    }
                }
            });
            return;
        }
        linearLayout.setVisibility(8);
    }

    public boolean isOnClick() {
        long currentTimeMillis = System.currentTimeMillis();
        long j = currentTimeMillis - this.lastClickTime;
        if (j > 1000) {
            this.lastClickTime = currentTimeMillis;
        }
        return !this.clickLimit ? j < 0 : j <= 1000;
    }
}
